package com.danciyixue.boot.client.test.model;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Min;

import java.io.Serial;
import java.io.Serializable;

/**
 * 学前测试保存请求对象
 *
 * @author youlaitech
 * @since 2025-07-01
 */
@Getter
@Setter
@Schema(description = "学前测试保存请求对象")
public class PreTestSaveRequest implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "系列ID", example = "1")
    @NotNull(message = "系列ID不能为空")
    private Long seriesId;

    @Schema(description = "教材ID", example = "2")
    @NotNull(message = "教材ID不能为空")
    private Long programId;

    @Schema(description = "测试ID", example = "2")
    @NotNull(message = "测试ID不能为空")
    private Long testId;

    @Schema(description = "测试项个数", example = "30")
    @NotNull(message = "测试项个数不能为空")
    @Min(value = 1, message = "测试项个数必须大于0")
    private Integer qnumber;

    @Schema(description = "测试评价", example = "本课程对你来说有点难度，你可以换一个其他课程。")
    private String remark;

    @Schema(description = "测试结果得分", example = "33")
    @NotNull(message = "测试结果得分不能为空")
    @Min(value = 0, message = "测试结果得分不能为负数")
    private Integer score;

    @Schema(description = "测试总共消耗时间(毫秒)", example = "90000")
    @NotNull(message = "测试总共消耗时间不能为空")
    @Min(value = 0, message = "测试总共消耗时间不能为负数")
    private Long timeConsuming;

    @Schema(description = "测试类型", example = "1")
    @NotNull(message = "测试类型不能为空")
    private Integer type;

    @Schema(description = "用户ID", example = "102474")
//    @NotNull(message = "用户ID不能为空")
    private Long userId;
}
